[IOS SDK] Sending Data to Other Players - Game Center
Posted
by
mohacs
on Stack Overflow
See other posts from Stack Overflow
or by mohacs
Published on 2010-12-30T16:41:28Z
Indexed on
2010/12/30
16:54 UTC
Read the original article
Hit count: 449
Hi guys, I am developing a simple game center multiplayer game. i did manage almost everything except sending messeage to players. what i mean, i can invite player to play game, game is starts etc.
regarding apple documentation i am using following method to send data but it' doesn't work at all.
const char *bytes = "123";
NSData *packet = [NSData dataWithBytes:&bytes length:3];
[myMatch sendDataToAllPlayers: packet withDataMode: GKMatchSendDataUnreliable error:nil];
if possible a working sample would be great. many thanks.
© Stack Overflow or respective owner